from aiogram import Dispatcher
from aiogram.filters import Command
from aiogram_dialog import DialogRegistry

from app.bot.filters.admin import IsAdminFilter

from .change_proxy import change_proxy_dialog
from .mailing import mailing_dialog
from .start import admin_dialog, start_admin


def register_handlers(dp: Dispatcher):
    dp.message.register(start_admin, Command(commands="admin"), IsAdminFilter())


def register_dialogs(registry: DialogRegistry):
    registry.register(admin_dialog)
    registry.register(mailing_dialog)
    registry.register(change_proxy_dialog)
